import request from "@/utils/request";

export function login(username, password) {
    return request({
        url: "/sysadmin/login",
        method: "post",
        data: {
            username,
            password
        }
    });
}

export function getInfo() {
    return request({
        url: "/sysadmin/info",
        method: "get"
    });
}

export function register(data) {
    return request({
        url: "/sysadmin/register",
        method: "post",
        data: data
    });
}

export function passwordUpdate(data) {
    return request({
        url: "/sysadmin/password",
        method: "post",
        data: data
    });
}

export function logout(data) {
    return request({
        url: "/sysadmin/logout",
        method: "post",
        data: data
    });
}
